
import { createRouter, createWebHashHistory } from "vue-router"
import Login from '../components/Login.vue'
import Main from '../components/Main.vue'
import UserList from '../main_content/UserList.vue'
import OrderList from '../main_content/OrderList.vue'
import SystemList from '../main_content/SystemList.vue'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            //路由路径 @RequestMapping相似
            path: '/',
            //跳转的组件
            component: Login
            //以上语句说明，当我们访问到'/login'路由时，就会跳转到Login组件，显示该vue页面
        }, 
        {
            //路由路径 @RequestMapping相似
            path: '/login',
            //跳转的组件
            component: Login
            //以上语句说明，当我们访问到'/login'路由时，就会跳转到Login组件，显示该vue页面
        }, {
            //路由路径
            path: '/main',
            //跳转的组件
            component:  Main
        }, {
            //路由路径
            path: '/user_list',
            //跳转的组件
            component:  UserList
        }, {
            //路由路径
            path: '/order_list',
            //跳转的组件
            component:  OrderList
        }, {
            //路由路径
            path: '/system_list',
            //跳转的组件
            component:  SystemList
        }
    ]
})

export default router
